#include<stdio.h>
int main()
{
    int sumOddLengthSubarrays(int* arr, int arrSize);
    int n,i;
    int b[n];
    for(i=0;i<n;i++)
    {
        scanf("%d\n",&b[i]);
    }
    printf("%d\n",sumOddLengthSubarrays(b, n));
}
int sumOddLengthSubarrays(int* arr, int arrSize){
    int i,j;
    int sum=0;
    for(i=0;i<arrSize;i++)
    {
        if(i%2!=0)
        {
            for(j=0;j<=i;j++)
        {
            sum=sum+arr[i];
            }
        }
    }
    return sum;

}